package com.geek.water.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.geek.water.entity.Area;
import com.geek.water.vo.AreaTreeVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface AreaService extends IService<Area> {


    public void validateAreaBeforeDelete(Long areaId);
    boolean hasChildren(Long areaId); // 检查是否有子区域
    List<AreaTreeVO> buildAreaTree(List<Area> areas);
    public void validateArea(Area area);
    @Transactional
    void deleteBySiteId(Long siteId);

}
